package com.iss.okair.controller.assets;

import com.iss.common.Message;
import com.iss.okair.db.entity.AssetsFinance;
import com.iss.okair.db.entity.Assetstrans;
import com.iss.okair.db.model.AssetsFinalModle;
import com.iss.okair.service.assets.AssetsFianlService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
@RestController
@RequestMapping("/logic/assets/finance")
public class AssetsFinalController {
    @Autowired
    private AssetsFianlService service;
    @RequestMapping("/list")
    public List<AssetsFinance> find(AssetsFinalModle model){
        return service.find(model);
    }
    @RequestMapping("/save")
    public Message save(AssetsFinance finance){
        Message msg =new Message();
        if (service.save(finance)){
            msg.setError(false);
            msg.setMsg("保存成功");
        }else {
         msg.setError(true);
         msg.setMsg("保存失败");
        }
        return  msg;
    }
    //领用和转移操作

}
